﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="WebRole1._Default" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <style type="text/css">
        .style1
        {
            width: 163px;
        }
        .style2
        {
            width: 312px;
        }
        .style3
        {
            width: 315px;
        }
    </style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Azure Use Case - ASP.NET, SQLAZURE, SQL Server (Connect)
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    </h2>
    <p>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <table style="width:100%;">
            <tr>
                <td class="style1">
                    Database Connection</td>
                <td class="style2" colspan="2">
                    <asp:DropDownList ID="ddlDatabase" runat="server">
                        <asp:ListItem Selected="True">SQLAzure</asp:ListItem>
                        <asp:ListItem Value="SQLServer">Hybrid (Connect)</asp:ListItem>
                    </asp:DropDownList>
                    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                        <ContentTemplate>
                            <asp:Label ID="lblResponseTime" runat="server" ForeColor="#CC0000"></asp:Label>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="btnSubmit" EventName="Click" />
                            <asp:AsyncPostBackTrigger ControlID="btnClear" EventName="Click" />
                        </Triggers>
                    </asp:UpdatePanel>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:Label ID="Label1" runat="server" Text="Customer Information"></asp:Label>
                </td>
                <td class="style2" colspan="2">
                    <asp:TextBox ID="txtCustomerInformaton" runat="server" style="margin-left: 0px"></asp:TextBox>
&nbsp;
                </td>
            </tr>
            <tr>
                <td class="style1">
                    &nbsp;</td>
                <td class="style2" colspan="2">
                    <asp:CheckBox ID="cbName" runat="server" Text="Name" />
                    <asp:MutuallyExclusiveCheckBoxExtender ID="cbName_MutuallyExclusiveCheckBoxExtender" 
                        runat="server" Enabled="True" Key="customer" TargetControlID="cbName">
                    </asp:MutuallyExclusiveCheckBoxExtender>
                    <br />
                    <asp:CheckBox ID="cbEmail" runat="server" Text="Email" />
                    <asp:MutuallyExclusiveCheckBoxExtender ID="cbEmail_MutuallyExclusiveCheckBoxExtender" 
                        runat="server" Enabled="True" Key="customer" TargetControlID="cbEmail">
                    </asp:MutuallyExclusiveCheckBoxExtender>
                    <br />
                    <asp:CheckBox ID="cbPhone" runat="server" Text="Phone" />
                    <asp:MutuallyExclusiveCheckBoxExtender ID="cbPhone_MutuallyExclusiveCheckBoxExtender" 
                        runat="server" Enabled="True" Key="customer" TargetControlID="cbPhone">
                    </asp:MutuallyExclusiveCheckBoxExtender>
                    <br />
                    <asp:CheckBox ID="cbState" runat="server" Text="State" />
                    <asp:MutuallyExclusiveCheckBoxExtender ID="cbState_MutuallyExclusiveCheckBoxExtender" 
                        runat="server" Enabled="True" Key="customer" TargetControlID="cbState">
                    </asp:MutuallyExclusiveCheckBoxExtender>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    &nbsp;</td>
                <td class="style3" valign="top">
                    <asp:Button ID="btnSubmit" runat="server" onclick="btnSubmit_Click" 
                        Text="Submit" />
                &nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btnClear" runat="server" onclick="btnClear_Click" 
                        Text="Clear Results" />
                &nbsp; </td>
                <td class="style2" valign="top">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style1">
                    &nbsp;</td>
                <td class="style2" colspan="2">
                           
                              
                                </td>
            </tr>
            <tr>
                <td class="style1">
                    &nbsp;</td>
                <td class="style2" colspan="2">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                           <asp:Label ID="lblResult" runat="server"></asp:Label>
                            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                                CellPadding="4" ForeColor="#333333" 
                                GridLines="None">
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                <Columns>
                                    <asp:BoundField DataField="CustomerID" HeaderText="CustomerID" 
                                        SortExpression="CustomerID" />
                                    <asp:BoundField DataField="CustomerName" HeaderText="Name" 
                                        SortExpression="CustomerName" />
                                    <asp:BoundField DataField="CustomerPhone" HeaderText="Phone" 
                                        SortExpression="CustomerPhone" />
                                    <asp:BoundField DataField="CustomerEmail" HeaderText="Email" 
                                        SortExpression="CustomerEmail" />
                                    <asp:BoundField DataField="CustomerCity" HeaderText="City" 
                                        SortExpression="CustomerCity" />
                                    <asp:BoundField DataField="CustomerZip" HeaderText="Zip" 
                                        SortExpression="CustomerZip" />
                                    <asp:BoundField DataField="CustomerState" HeaderText="State" 
                                        SortExpression="CustomerState" />
                                    <asp:BoundField DataField="CustomerCountry" HeaderText="Country" 
                                        SortExpression="CustomerCountry" />
                                    <asp:BoundField DataField="CustomerAccountType" HeaderText="AccountType" 
                                        SortExpression="CustomerAccountType" />
                                </Columns>
                                <EditRowStyle BackColor="#999999" />
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                            </asp:GridView>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="btnSubmit" EventName="Click" />
                            <asp:AsyncPostBackTrigger ControlID="btnClear" EventName="Click" />
                        </Triggers>
                    </asp:UpdatePanel>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    Replace Web.Config Test</td>
                <td class="style2" colspan="2">
                    <asp:Button ID="btnWebCfg" runat="server" onclick="btnWebCfg_Click" 
                        Text="Replaced Settings" />
                    <br />
                    <asp:Label ID="lblAppSettings" runat="server"></asp:Label>
                </td>
            </tr>
        </table>
    </p>
    <p>
        &nbsp;</p>
    </asp:Content>
